package studentProgressReport;

import java.util.ArrayList;
import java.util.Collection;

public class Curriculum {
	private String name;
	private Collection<Course> course =new ArrayList<Course>();

	public Curriculum(String curriculumName) {
		name = curriculumName;
	}

	public void addCourse(String courseName, Integer duration) {
		course.add(new Course(courseName, duration));
	}
	
	public String getName() {
		return name;
	}

	public int calculateCourseDuration() {
		int count = 0;
		for (Course item : course) {
			count = count + item.getDuration();
		}
		return count;
	}
}
